How to use SQL Join in LINQ like INNER JOIN, LEFT OUTER JOIN, CROSS JOIN, and GROUP JOIN explain with example?
How to use SQL Join in LINQ?
647
24-Sep-2021
Ravi Vishwakarma
28-Sep-2021Join in LINQ
In LINQ, join operators are used to join more than one list or the collection and get the matched data from the collection based on condition. The LINQ join operator functionality are the same as the SQL Join query.
LINQ has different types of joins
Inner Join Example -
class Subject{public int SubjectId { get; set; }
public string SubjectName { get; set; }
}
Output
Left Outer Example -
class Subject{public int SubjectId { get; set; }
public string SubjectName { get; set; }
}
Output
Cross Join LINQ
Example
Cross Join LINQ
Output